cmake_minimum_required(VERSION 3.10)

set(CRFoundation "CRFoundation")

add_definitions(-DCURL_STATICLIB -DCRFOUNDATION_EXPORTS -D_USRDLL)
if(MSVC)
    add_definitions(
        -D_UNICODE
        -DUNICODE)
endif(MSVC)


aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR} cfSource)
file(GLOB cfMethod "${CMAKE_CURRENT_SOURCE_DIR}/**/*.cpp")


add_library(CRFoundation SHARED ${cfSource} ${cfMethod} )

set_target_properties(CRFoundation PROPERTIES COTIRE_CXX_PREFIX_HEADER_INIT "stdafx.h")
cotire(CRFoundation)